<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/views1/DTD/views1-transitional.dtd">
<f:view xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.prime.com.tr/ui">
	<ui:composition template="/views/layout/main.xhtml">
		<ui:define name="conteudo">
			<h:form id="formPrincipal">
				<div class="grid_18 div_48">
					<p:commandButton widgetVar="btn_Novo" styleClass="add-user" ajax="false" action="#{professorBean.goCreate}" title="Novo"/>
					<c:if test="#{professorBean.professorInstance.id > 0}">
						<p:commandButton widgetVar="btn_Editar" styleClass="edit-user" ajax="false" action="#{professorBean.goEdit}" title="Editar" />
						<c:if test="#{professorBean.professorInstance.situacao eq 'Desativado'}">
							<p:commandButton widgetVar="btn_Ativar" styleClass="enable-user" type="button" title="Ativar" onclick="dialogoAtivar.show()"/>
						</c:if>
						<c:if test="#{professorBean.professorInstance.situacao eq 'Ativo'}">
							<p:commandButton widgetVar="btn_Desativar" styleClass="disable-user" type="button" title="Desativar" onclick="dialogoDesativar.show()"/>
						</c:if>
					</c:if>
					<p:commandButton widgetVar="btn_Buscar" styleClass="search-user" type="button" ajax="false" title="Buscar" onclick="promptBuscaProfessor.show();" />
					<p:commandButton styleClass="home" ajax="false" action="#{professorBean.goHome}" title="Início" />
				</div>

				<div class="grid_18 titulo">Manutenção de Professores</div>

				<div class="grid_18">
					<p:messages id="mensages"/>
				</div>

				<div class="grid_4 div-label">Nome Completo:</div>
				<div class="grid_14 div-campo">
					<p:inputText id="professor_nomeCompleto" disabled="true"
						widgetVar="professor_nomeCompleto" styleClass="input-mg"
						value="#{professorBean.professorInstance.nomeCompleto}" />
				</div>

				<div class="grid_4 div-label">Email:</div>
				<div class="grid_14 div-campo">
					<p:inputText id="professor_email" disabled="true"
						widgetVar="professor_email" styleClass="input-mg"
						value="#{professorBean.professorInstance.email}" />
				</div>

			</h:form>

			<!-- INCLUSAO DE OUTROS XHTMLs -->
			<ui:include src="/views/professores/_promptBuscaProfessor.xhtml" />
			<ui:include src="/views/professores/_dialogAtivacao.xhtml" />
			<ui:include src="/views/professores/_dialogAlteracaoSenha.xhtml" />
		</ui:define>
	</ui:composition>
</f:view>